import request from '@/utils/request'

export function selectCategorizeInfoDict() {
  return request({
    url: '/factor/categorizeInfo/dict',
    method: 'get',
  })
}

// 查询碳排放因子数据库列表
export function listCategorizeInfo(query) {
  return request({
    url: '/factor/categorizeInfo/list',
    method: 'get',
    params: query
  })
}

// 查询碳排放因子数据库详细
export function getCategorizeInfo(id) {
  return request({
    url: '/factor/categorizeInfo/' + id,
    method: 'get'
  })
}

// 新增碳排放因子数据库
export function addCategorizeInfo(data) {
  return request({
    url: '/factor/categorizeInfo',
    method: 'post',
    data: data
  })
}

// 修改碳排放因子数据库
export function updateCategorizeInfo(data) {
  return request({
    url: '/factor/categorizeInfo',
    method: 'put',
    data: data
  })
}

// 删除碳排放因子数据库
export function delCategorizeInfo(id) {
  return request({
    url: '/factor/categorizeInfo/' + id,
    method: 'delete'
  })
}

// 导出碳排放因子数据库
export function exportCategorizeInfo(query) {
  return request({
    url: '/factor/categorizeInfo/export',
    method: 'get',
    params: query
  })
}

// 清理参数缓存
export function clearCategorizeInfoCache() {
  return request({
    url: '/factor/categorizeInfo/clearCache',
    method: 'delete'
  })
}
